/*package com.gosophia.reportData.action;

import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.gosophia.flowFormManagement.dto.FlowFormDTO;
import com.gosophia.flowFormManagement.dto.FormFieldDTO;
import com.gosophia.flowFormManagement.dto.FormInstanceDTO;
import com.gosophia.flowFormManagement.ws.FlowFormWebService;
import com.gosophia.flowFormManagement.ws.FormFieldWebService;
import com.gosophia.flowFormManagement.ws.FormInstanceWebService;
import com.gosophia.reportData.dto.LaunchReportDTO;
import com.gosophia.reportData.dto.ReportingDTO;
import com.gosophia.reportData.ws.ReportDataWebService;
import com.gosophia.taskManagement.dto.TaskDTO;
import com.opensymphony.xwork2.ActionSupport;

*//**
 * 上报详细
 * 
 * @author tianchunyu
 * 
 *//*
@Controller
@Scope("prototype")
public class ReportDetailAction extends ActionSupport {

    *//**
     * 
     *//*
    private static final long serialVersionUID = 1L;

    @Autowired
    private ReportDataWebService reportDataWebService;

    @Autowired
    private FlowFormWebService flowFormWebService;

    @Autowired
    private FormInstanceWebService formInstanceWebService;

    @Autowired
    private FormFieldWebService formFieldWebService;

    private Long jobId;

    private String approvalState;

    private LaunchReportDTO launchReportDto;

    private ReportingDTO reportingDto;

    private List<TaskDTO> taskDtos;

    private FormInstanceDTO formInstanceDTO;

    private Map<String, Object> newDataInstance;

    @Override
    public String execute() throws Exception {

        if ("审核".equals(approvalState)) {
            reportingDto = reportDataWebService.findReporting(jobId);
            taskDtos = reportDataWebService.findOperaterHistories(jobId);
            String mode = reportDataWebService.findLaunchReportById(
                    reportingDto.getLaunchReportId()).getReportMode();
            if ("F".equals(mode)) {
                return "annexContent";
            } else {
                LaunchReportDTO launchReportDTO = reportDataWebService
                        .findLaunchReportById(reportingDto.getLaunchReportId());
                FlowFormDTO flowFormDTO = flowFormWebService
                        .findFlowFormById(launchReportDTO.getFlowFormId());
                if (flowFormDTO.getModel().equals('F')) {
                    formInstanceDTO = formInstanceWebService
                            .findFormInstanceById(reportingDto
                                    .getFormInstanceId());
                    Map<Long, Object> dataInstance = formInstanceDTO
                            .getInstanceData();
                    newDataInstance = new HashMap<String, Object>();
                    for (Entry<Long, Object> entry : dataInstance.entrySet()) {
                        FormFieldDTO formFieldDTO = formFieldWebService
                                .findFormFieldById(entry.getKey());
                        newDataInstance.put(formFieldDTO.getFieldLable(), entry
                                .getValue());
                    }
                    return "flowFormContent";
                } else {

                    return "excelContent";
                }
            }

        } else {
            launchReportDto = reportDataWebService.findLaunchReport(jobId);
            taskDtos = reportDataWebService.findOperaterHistories(jobId);
            return "launchContent";
        }
    }

    public Long getJobId() {
        return jobId;
    }

    public void setJobId(Long jobId) {
        this.jobId = jobId;
    }

    public ReportingDTO getReportingDto() {
        return reportingDto;
    }

    public void setReportingDto(ReportingDTO reportingDto) {
        this.reportingDto = reportingDto;
    }

    public List<TaskDTO> getTaskDtos() {
        return taskDtos;
    }

    public void setTaskDtos(List<TaskDTO> taskDtos) {
        this.taskDtos = taskDtos;
    }

    public LaunchReportDTO getLaunchReportDto() {
        return launchReportDto;
    }

    public void setLaunchReportDto(LaunchReportDTO launchReportDto) {
        this.launchReportDto = launchReportDto;
    }

    public String getApprovalState() {
        return approvalState;
    }

    public void setApprovalState(String approvalState) {
        if (approvalState != null) {
            try {
                approvalState = java.net.URLDecoder.decode(approvalState,
                        "utf-8");
            } catch (UnsupportedEncodingException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        this.approvalState = approvalState;
    }

    public FormInstanceDTO getFormInstanceDTO() {
        return formInstanceDTO;
    }

    public void setFormInstanceDTO(FormInstanceDTO formInstanceDTO) {
        this.formInstanceDTO = formInstanceDTO;
    }

    public Map<String, Object> getNewDataInstance() {
        return newDataInstance;
    }

    public void setNewDataInstance(Map<String, Object> newDataInstance) {
        this.newDataInstance = newDataInstance;
    }

}
*/